#ifndef COMMANDS_H
#define COMMANDS_H

#include <QColor>

class Command {
public:
    enum TYPE {
        LINE,
        ROTATE,
        JUMP,
        COLOR,
    };

    TYPE commandType;
};

class Rotate : public Command {
public:
    int angle;
    Rotate(int angle) {
        this->commandType = Command::ROTATE;
        this->angle = angle;
    }
};

class Line : public Command {
public:
    int x1;
    int y1;
    int x2;
    int y2;

    Line(int x1, int y1, int x2, int y2) {
        this->commandType = Command::LINE;
        this->x1 = x1;
        this->y1 = y1;
        this->x2 = x2;
        this->y2 = y2;
    }
};

class Jump : public Line {
public:
    Jump(int x, int y) : Line(0, 0, x, y) {
        this->commandType = Command::JUMP;
    }
};

class Color : public Command {
public:
    QColor cor;

    Color(const QColor &cor) {
        this->commandType = Command::COLOR;
        this->cor = cor;
    }
};

#endif // COMMANDS_H
